import React from 'react';
import { Card, Divider } from 'antd';
import { connect } from 'dva';

import LoginForm from './LoginForm'

import DescriptionList from '@/components/DescriptionList';
const { Description } = DescriptionList;

@connect(({ login }) => ({
  login,
}))
class List extends React.Component {

  render() {
    const { login:{ user } } = this.props;

    return (
      <div>
        <div>登录页面</div>
        <LoginForm >
        </LoginForm>

        <Divider style={{ marginBottom: 32 }} />
        <div>登录登录成功后,可以获得这些信息</div>

        <Card bordered={false}>
          <DescriptionList size="large" title="用户信息" style={{ marginBottom: 32 }}>
            <Description term="账号">{user.username}</Description>
            <Description term="名称">{user.name}</Description>
            {
            //<Description term="uid">{user.uid}</Description>
            //<Description term="sid">{user.session_id}</Description>
            }
          </DescriptionList>
          <Divider style={{ marginBottom: 32 }} />
          <DescriptionList size="large" title="公司信息" style={{ marginBottom: 32 }}>
            <Description term="公司id">{user.company_id}</Description>
            <Description term="服务">{user['web.base.url']}</Description>
          </DescriptionList>
        </Card>


      </div>
    );
  }
}

export default List;





